import {createRouter, createWebHistory} from 'vue-router'
import Home from '../pages/Home.vue'
import Info from '../pages/Info.vue'
import List from '../pages/List.vue'
import Contact from '../pages/Contact.vue'
import Detail from '../pages/Detail.vue'

const routes = [
    { path: '/', component: Home },
    { path: '/info', component: Info },
    { path: '/list', component: List },
    { path: '/contact', component: Contact },
    { path: '/detail/:id?', component: Detail },
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

export default router;